package com.dt76.smallloanbackendservice.controller.hzp;

import com.dt76.smallloanbackendservice.pojo.hzp.HContractTemplate;
import com.dt76.smallloanbackendservice.service.hzp.HContractTemplateService;
import com.dt76.smallloanbackendservice.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/hzp")
public class HContractTemplateController {
    @Autowired
    private HContractTemplateService contractTemplateService;

    @RequestMapping("/contractTemplate")
    public List<HContractTemplate> qryAllHContractTemplate() {
        System.out.println(contractTemplateService.qryAllHCT());
        return contractTemplateService.qryAllHCT();
    }
    @RequestMapping("/getPageHCT")
    public Page PageHCT(Integer pageIndex,Integer pageSize){
        Page page=new Page();
        page.setPageIndex(pageIndex);

        Page page1=contractTemplateService.getPageHCT(page);
        return page1;
    }

}
